package com.jialiang.cli.command;


import cn.hutool.core.io.FileUtil;
import picocli.CommandLine.Command;


import java.io.File;
import java.util.List;

@Command(name = "list",description = "查看文件列表",mixinStandardHelpOptions = true)
public class ListCommand implements Runnable{

    @Override
    public void run() {
        String projectPath = System.getProperty("user.dir");
        // 整个项目的跟路径
        File parentFile = new File(projectPath).getParentFile();
        // 输入路径
        String inputPath = new File(parentFile,"jialiang-generator-demo-projects/acm-template").getAbsolutePath();
        List<File> files = FileUtil.loopFiles(inputPath);
        files.forEach(System.out::println);
    }

}
